package ooday02;

public class OverrideDemo {
    public static void main(String[] args) {
        //重写方法被调用时,看对象的类型执行方法(new谁就调谁)
        Student zg=new Student("张光",24,"广西","jsd2404","001");
        zg.sayHi();
        Teacher ll=new Teacher("李林",25,"南京",40000);
        ll.sayHi();
        Doctor zl=new Doctor("赵亮",15,"桂林","主治医师");
        zl.sayHi();
    }

}
